package org.vnl.platform.orm;

import java.io.Serializable;
import java.util.Collection;

/**
 * 查詢後的結果以一頁一頁的方式儲存
 * 
 * @author Vaughan
 *
 */
public class PageResult implements Serializable {

    /**
     * 
     */
    private static final long serialVersionUID = -822880423899435658L;
    
    private int currentPage;
    private int pageSize;
    private int total;
    private Collection<? extends Object> data;
    
    public PageResult() {
        
    }

    public PageResult(int currentPage, int pageSize, int total, Collection<? extends Object> data) {
        super();
        this.currentPage = currentPage;
        this.pageSize = pageSize;
        this.total = total;
        this.data = data;
    }

    public int getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(int currentPage) {
        this.currentPage = currentPage;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public Collection<? extends Object> getData() {
        return data;
    }

    public void setData(Collection<? extends Object> data) {
        this.data = data;
    }
}
